package com.fitso.model.calculator.idealweight;

import com.fitso.model.bean.Body;
import com.fitso.model.bean.measure.length.Meter;
import com.fitso.model.bean.measure.mass.KiloGram;
import com.fitso.model.bean.measure.mass.Mass;
import com.fitso.model.calculator.IdealWeightCalculator;

/**
 * Implementation of {@link IdealWeightCalculator} that was used to create the
 * Met Life tables. It has lost favor since its data is based on estimates and
 * not population statistics but is still useful for men - short woman approach
 * lean body weight and it is therefore dangerous or impossible to attain.
 * 
 * @author timothystorm
 */
public class BrocaIdealWeightCalculator implements IdealWeightCalculator {
	private static final Double IDEAL_BMI = 21.75;

	public Mass calculate(Body body) {
		Meter m = new Meter(body.getHeight());
		return new KiloGram(m.pow(2).multiply(IDEAL_BMI).getValue());
	}
}
